<?php
class FloorModel extends BaseModel
{
    public function getList($mid = null)
    {
        $map = array();
        if (intval($mid)) {
            $map['mid'] = $mid;
        }
        return $this->getListByWhere($map, 'id, mid, sain, name', null, " `order` ASC");
    }

    public function getOne($id)
    {
        if (empty($id)) {
            return false;
        }
        $map = array();
        $map['fid'] = $id;
        return $this->getByWhere($map, 'id, mid, sain, name');
    }

    /**
     * 获取商场分座信息
     * @param int $mid
     * @author Ice <iceinto@mallog.com.cn>
     */
    public function getMallPlace($mid)
    {
        if (empty($mid)) {
            return false;
        }
        $map = array();
        $map['mid'] = $mid;
        return $this->field('place')->where($map)->group('place')->select();
    }
}

?>